package com.powernode.service;

import com.github.pagehelper.Page;
import com.powernode.domain.User;
import com.powernode.dto.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserService{


    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);


    User login( String username,  String password);

    /**
     *  分页查询用户
     * @param userDto
     * @return
     */
    Page<User> queryForPage(UserDto userDto);

    /**
     * 根据条件查询用户
     * @param deleted
     * @param role
     * @return
     */
    List<User> queryUsers(Integer deleted, Integer role);

}
